Conversation
- adds a secondary canvas for drawing temporary stuff
|
related to #32 |
Author
|
Oh, I haven't noticed that someone has already created another PR for that -.- I think our two approaches are different enough though to leave them both open :)
|
RobLoach
reviewed
Feb 27, 2024
|
|
||
| ClearBackground(RAYWHITE); | ||
|
|
||
| DrawTexture(texture, screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2, RED); |
There was a problem hiding this comment.
The only change in the _tint example versus the other example is the Tint color. This means there's a bunch of duplicated code for a 1-line change. Instead of having the textures_logo_raylib_tint.c example, I'd actually recommend porting over an official texture example that implements tint, like textures_bunnymark.c.
RobLoach
reviewed
Feb 27, 2024
| // RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); | ||
| DrawTexture(texture_ptr, posX, posY, color_ptr) { | ||
| DrawTexture(texture_ptr, posX, posY, tint_ptr) { | ||
| /** @type {ArrayBuffer} */ |
There was a problem hiding this comment.
I don't think there's type hinting in any of the other JavaScript code here...
Suggested change
| /** @type {ArrayBuffer} */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have adapted my previous implementation for texture drawing to the merged one and tinting works now.
Changes